home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / ActiveX / NCTWavPlayer.exe / Main / frmOptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-03-06  |  18.4 KB  |  518 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  4. Begin VB.Form frmOptions 
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "Setup TestNCTWavPlayer "
  7.    ClientHeight    =   3540
  8.    ClientLeft      =   2565
  9.    ClientTop       =   1500
  10.    ClientWidth     =   5985
  11.    Icon            =   "frmOptions.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3540
  17.    ScaleWidth      =   5985
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   2  'CenterScreen
  20.    Begin MSComDlg.CommonDialog CommonDialog1 
  21.       Left            =   450
  22.       Top             =   2925
  23.       _ExtentX        =   847
  24.       _ExtentY        =   847
  25.       _Version        =   393216
  26.    End
  27.    Begin TabDlg.SSTab SSTab1 
  28.       Height          =   2745
  29.       Left            =   60
  30.       TabIndex        =   9
  31.       Top             =   120
  32.       Width           =   5850
  33.       _ExtentX        =   10319
  34.       _ExtentY        =   4842
  35.       _Version        =   393216
  36.       Style           =   1
  37.       Tabs            =   4
  38.       TabsPerRow      =   4
  39.       TabHeight       =   520
  40.       TabCaption(0)   =   "I/O Device"
  41.       TabPicture(0)   =   "frmOptions.frx":000C
  42.       Tab(0).ControlEnabled=   -1  'True
  43.       Tab(0).Control(0)=   "Frame1"
  44.       Tab(0).Control(0).Enabled=   0   'False
  45.       Tab(0).Control(1)=   "Frame2"
  46.       Tab(0).Control(1).Enabled=   0   'False
  47.       Tab(0).ControlCount=   2
  48.       TabCaption(1)   =   "Scale "
  49.       TabPicture(1)   =   "frmOptions.frx":0028
  50.       Tab(1).ControlEnabled=   0   'False
  51.       Tab(1).Control(0)=   "Frame4"
  52.       Tab(1).Control(1)=   "Frame5"
  53.       Tab(1).ControlCount=   2
  54.       TabCaption(2)   =   "Color"
  55.       TabPicture(2)   =   "frmOptions.frx":0044
  56.       Tab(2).ControlEnabled=   0   'False
  57.       Tab(2).Control(0)=   "List1"
  58.       Tab(2).Control(1)=   "cmdColorChoice"
  59.       Tab(2).Control(2)=   "Color"
  60.       Tab(2).ControlCount=   3
  61.       TabCaption(3)   =   "Other"
  62.       TabPicture(3)   =   "frmOptions.frx":0060
  63.       Tab(3).ControlEnabled=   0   'False
  64.       Tab(3).Control(0)=   "Text2"
  65.       Tab(3).Control(1)=   "Text1"
  66.       Tab(3).Control(2)=   "Label4"
  67.       Tab(3).Control(3)=   "Label3"
  68.       Tab(3).ControlCount=   4
  69.       Begin VB.TextBox Text2 
  70.          Height          =   285
  71.          Left            =   -73050
  72.          Locked          =   -1  'True
  73.          TabIndex        =   34
  74.          Text            =   "Text2"
  75.          Top             =   1140
  76.          Width           =   3165
  77.       End
  78.       Begin VB.TextBox Text1 
  79.          Height          =   300
  80.          Left            =   -73050
  81.          TabIndex        =   33
  82.          Text            =   "Text1"
  83.          Top             =   675
  84.          Width           =   3165
  85.       End
  86.       Begin VB.PictureBox Color 
  87.          Height          =   1410
  88.          Left            =   -72375
  89.          ScaleHeight     =   1350
  90.          ScaleWidth      =   2820
  91.          TabIndex        =   30
  92.          Top             =   450
  93.          Width           =   2880
  94.       End
  95.       Begin VB.CommandButton cmdColorChoice 
  96.          Caption         =   "Change Color"
  97.          Height          =   390
  98.          Left            =   -72360
  99.          TabIndex        =   29
  100.          Top             =   2040
  101.          Width           =   2835
  102.       End
  103.       Begin VB.ListBox List1 
  104.          Height          =   2010
  105.          ItemData        =   "frmOptions.frx":007C
  106.          Left            =   -74850
  107.          List            =   "frmOptions.frx":00A3
  108.          TabIndex        =   28
  109.          Top             =   420
  110.          Width           =   2295
  111.       End
  112.       Begin VB.Frame Frame2 
  113.          Caption         =   "Playback device"
  114.          Height          =   960
  115.          Left            =   180
  116.          TabIndex        =   21
  117.          Top             =   1560
  118.          Width           =   5520
  119.          Begin VB.CheckBox Check6 
  120.             Caption         =   "Selected during playing"
  121.             Height          =   240
  122.             Left            =   3420
  123.             TabIndex        =   26
  124.             Top             =   420
  125.             Width           =   1965
  126.          End
  127.          Begin VB.ComboBox Combo2 
  128.             Height          =   315
  129.             Left            =   825
  130.             Style           =   2  'Dropdown List
  131.             TabIndex        =   24
  132.             Top             =   360
  133.             Width           =   2325
  134.          End
  135.          Begin VB.Label Label1 
  136.             Caption         =   "Name:"
  137.             Height          =   315
  138.             Left            =   180
  139.             TabIndex        =   25
  140.             Top             =   420
  141.             Width           =   795
  142.          End
  143.       End
  144.       Begin VB.Frame Frame1 
  145.          Caption         =   "Record device"
  146.          Height          =   960
  147.          Left            =   180
  148.          TabIndex        =   20
  149.          Top             =   480
  150.          Width           =   5520
  151.          Begin VB.CheckBox Check7 
  152.             Caption         =   "Event of the end  recordblock"
  153.             Height          =   540
  154.             Left            =   3420
  155.             TabIndex        =   27
  156.             Top             =   225
  157.             Width           =   1845
  158.          End
  159.          Begin VB.ComboBox Combo1 
  160.             Height          =   315
  161.             Left            =   825
  162.             Style           =   2  'Dropdown List
  163.             TabIndex        =   22
  164.             Top             =   360
  165.             Width           =   2310
  166.          End
  167.          Begin VB.Label Label2 
  168.             Caption         =   "Name:"
  169.             Height          =   315
  170.             Left            =   180
  171.             TabIndex        =   23
  172.             Top             =   420
  173.             Width           =   675
  174.          End
  175.       End
  176.       Begin VB.Frame Frame5 
  177.          Caption         =   "Horizontal scale"
  178.          Height          =   960
  179.          Left            =   -74820
  180.          TabIndex        =   15
  181.          Top             =   480
  182.          Width           =   5520
  183.          Begin VB.CheckBox Check3 
  184.             Caption         =   "Grid"
  185.             Height          =   195
  186.             Left            =   1440
  187.             TabIndex        =   19
  188.             Top             =   420
  189.             Width           =   870
  190.          End
  191.          Begin VB.CheckBox Check1 
  192.             Caption         =   "Enabled"
  193.             Height          =   195
  194.             Left            =   120
  195.             TabIndex        =   18
  196.             Top             =   420
  197.             Width           =   1155
  198.          End
  199.          Begin VB.OptionButton Option3 
  200.             Caption         =   "Samples"
  201.             Height          =   195
  202.             Index           =   0
  203.             Left            =   2580
  204.             TabIndex        =   17
  205.             Top             =   420
  206.             Width           =   1035
  207.          End
  208.          Begin VB.OptionButton Option3 
  209.             Caption         =   "Millisecond"
  210.             Height          =   195
  211.             Index           =   1
  212.             Left            =   3900
  213.             TabIndex        =   16
  214.             Top             =   420
  215.             Width           =   1215
  216.          End
  217.       End
  218.       Begin VB.Frame Frame4 
  219.          Caption         =   "Vertical scale"
  220.          Height          =   960
  221.          Left            =   -74820
  222.          TabIndex        =   10
  223.          Top             =   1560
  224.          Width           =   5535
  225.          Begin VB.CheckBox Check2 
  226.             Caption         =   "Enabled"
  227.             Height          =   195
  228.             Left            =   120
  229.             TabIndex        =   14
  230.             Top             =   360
  231.             Width           =   1125
  232.          End
  233.          Begin VB.CheckBox Check4 
  234.             Caption         =   "Grid"
  235.             Height          =   195
  236.             Left            =   1440
  237.             TabIndex        =   13
  238.             Top             =   360
  239.             Width           =   870
  240.          End
  241.          Begin VB.OptionButton Option4 
  242.             Caption         =   "Samples"
  243.             Height          =   195
  244.             Index           =   0
  245.             Left            =   2580
  246.             TabIndex        =   12
  247.             Top             =   360
  248.             Width           =   1275
  249.          End
  250.          Begin VB.OptionButton Option4 
  251.             Caption         =   "DB Value"
  252.             Height          =   195
  253.             Index           =   1
  254.             Left            =   3960
  255.             TabIndex        =   11
  256.             Top             =   360
  257.             Width           =   1275
  258.          End
  259.       End
  260.       Begin VB.Label Label4 
  261.          Caption         =   "Temporaly Directory:"
  262.          Height          =   300
  263.          Left            =   -74700
  264.          TabIndex        =   32
  265.          Top             =   675
  266.          Width           =   1665
  267.       End
  268.       Begin VB.Label Label3 
  269.          Caption         =   "Free space (Kb):"
  270.          Height          =   285
  271.          Left            =   -74700
  272.          TabIndex        =   31
  273.          Top             =   1140
  274.          Width           =   1545
  275.       End
  276.    End
  277.    Begin VB.PictureBox picOptions 
  278.       BorderStyle     =   0  'None
  279.       Height          =   3780
  280.       Index           =   3
  281.       Left            =   -20000
  282.       ScaleHeight     =   3780
  283.       ScaleWidth      =   5685
  284.       TabIndex        =   5
  285.       TabStop         =   0   'False
  286.       Top             =   480
  287.       Width           =   5685
  288.       Begin VB.Frame fraSample4 
  289.          Caption         =   "Sample 4"
  290.          Height          =   1785
  291.          Left            =   2100
  292.          TabIndex        =   8
  293.          Top             =   840
  294.          Width           =   2055
  295.       End
  296.    End
  297.    Begin VB.PictureBox picOptions 
  298.       BorderStyle     =   0  'None
  299.       Height          =   3780
  300.       Index           =   2
  301.       Left            =   -20000
  302.       ScaleHeight     =   3780
  303.       ScaleWidth      =   5685
  304.       TabIndex        =   4
  305.       TabStop         =   0   'False
  306.       Top             =   480
  307.       Width           =   5685
  308.       Begin VB.Frame fraSample3 
  309.          Caption         =   "Sample 3"
  310.          Height          =   1785
  311.          Left            =   1545
  312.          TabIndex        =   7
  313.          Top             =   675
  314.          Width           =   2055
  315.       End
  316.    End
  317.    Begin VB.PictureBox picOptions 
  318.       BorderStyle     =   0  'None
  319.       Height          =   3780
  320.       Index           =   1
  321.       Left            =   -20000
  322.       ScaleHeight     =   3780
  323.       ScaleWidth      =   5685
  324.       TabIndex        =   3
  325.       TabStop         =   0   'False
  326.       Top             =   480
  327.       Width           =   5685
  328.       Begin VB.Frame fraSample2 
  329.          Caption         =   "Sample 2"
  330.          Height          =   1785
  331.          Left            =   645
  332.          TabIndex        =   6
  333.          Top             =   300
  334.          Width           =   2055
  335.       End
  336.    End
  337.    Begin VB.CommandButton cmdApply 
  338.       Caption         =   "Apply"
  339.       Height          =   375
  340.       Left            =   4740
  341.       TabIndex        =   2
  342.       Top             =   3000
  343.       Width           =   1095
  344.    End
  345.    Begin VB.CommandButton cmdCancel 
  346.       Cancel          =   -1  'True
  347.       Caption         =   "Cancel"
  348.       Height          =   375
  349.       Left            =   3480
  350.       TabIndex        =   1
  351.       Top             =   3000
  352.       Width           =   1095
  353.    End
  354.    Begin VB.CommandButton cmdOK 
  355.       Caption         =   "OK"
  356.       Height          =   375
  357.       Left            =   2280
  358.       TabIndex        =   0
  359.       Top             =   3000
  360.       Width           =   1095
  361.    End
  362. Attribute VB_Name = "frmOptions"
  363. Attribute VB_GlobalNameSpace = False
  364. Attribute VB_Creatable = False
  365. Attribute VB_PredeclaredId = True
  366. Attribute VB_Exposed = False
  367. Dim TypeVertical, TypeHorizontal
  368. Private Sub cmdApply_Click()
  369.     frmDialog.NCTWavPlayer1.devInput = Combo1.ListIndex
  370.     frmDialog.NCTWavPlayer1.devOutput = Combo2.ListIndex
  371.     frmDialog.NCTWavPlayer1.flgSelectedPlay = Check6.Value
  372.     frmDialog.NCTWavPlayer1.flgEndRecordBlock = Check7.Value
  373.     SetParamView
  374.     SetParametrColor
  375. End Sub
  376. Private Sub cmdCancel_Click()
  377.     Unload Me
  378. End Sub
  379. Private Sub cmdColorChoice_Click()
  380.     SelectColor
  381. End Sub
  382. Private Sub cmdOK_Click()
  383.     frmDialog.NCTWavPlayer1.devInput = Combo1.ListIndex
  384.     frmDialog.NCTWavPlayer1.devOutput = Combo2.ListIndex
  385.     frmDialog.NCTWavPlayer1.flgSelectedPlay = Check6.Value
  386.     frmDialog.NCTWavPlayer1.flgEndRecordBlock = Check7.Value
  387.     SetParamView
  388.     SetParametrColor
  389.     Unload Me
  390. End Sub
  391. Private Sub Form_Load()
  392.     Dim kDevInput, kDevOutput
  393.     kDevInput = frmDialog.NCTWavPlayer1.devInput
  394.     For i = 0 To frmDialog.NCTWavPlayer1.devInputMax
  395.         frmDialog.NCTWavPlayer1.devInput = i
  396.         Combo1.AddItem frmDialog.NCTWavPlayer1.devInputName
  397.     Next
  398.     frmDialog.NCTWavPlayer1.devInput = kDevInput
  399.     Combo1.ListIndex = kDevInput
  400.         
  401.     kDevOutput = frmDialog.NCTWavPlayer1.devOutput
  402.     For i = 0 To frmDialog.NCTWavPlayer1.devOutputMax
  403.         frmDialog.NCTWavPlayer1.devOutput = i
  404.         Combo2.AddItem frmDialog.NCTWavPlayer1.devOutputName
  405.     Next
  406.     frmDialog.NCTWavPlayer1.devOutput = kDevOutput
  407.     Combo2.ListIndex = kDevOutput
  408.     ' Scale settings
  409.     If frmDialog.NCTWavPlayer1.VisibleBottomScale = True Then Check1.Value = 1 Else Check1.Value = 0
  410.     If frmDialog.NCTWavPlayer1.VisibleRightScale = True Then Check2.Value = 1 Else Check2.Value = 0
  411.     If frmDialog.NCTWavPlayer1.VisibleGridX = True Then Check3.Value = 1 Else Check3.Value = 0
  412.     If frmDialog.NCTWavPlayer1.VisibleGridY = True Then Check4.Value = 1 Else Check4.Value = 0
  413.     If frmDialog.NCTWavPlayer1.BottomScaleType = 1 Then
  414.         Option3(0).Value = True
  415.         Option3(1).Value = False
  416.     End If
  417.     If frmDialog.NCTWavPlayer1.BottomScaleType = 2 Then
  418.         Option3(1).Value = True
  419.         Option3(0).Value = False
  420.     End If
  421.     If frmDialog.NCTWavPlayer1.RightScaleType = 1 Then
  422.         Option4(0).Value = True
  423.         Option4(1).Value = False
  424.     End If
  425.     If frmDialog.NCTWavPlayer1.RightScaleType = 2 Then
  426.         Option4(1).Value = True
  427.         Option4(0).Value = False
  428.     End If
  429.     If (frmDialog.NCTWavPlayer1.flgSelectedPlay = True) Then
  430.         Check6.Value = 1
  431.     Else
  432.         Check6.Value = 0
  433.     End If
  434.     If (frmDialog.NCTWavPlayer1.flgEndRecordBlock = True) Then
  435.         Check7.Value = 1
  436.     Else
  437.         Check7.Value = 0
  438.     End If
  439.     ' Colors
  440.     List1.ItemData(0) = frmDialog.NCTWavPlayer1.clrDigitalWaveform
  441.     List1.ItemData(1) = frmDialog.NCTWavPlayer1.clrAnalogWaveform
  442.     List1.ItemData(2) = frmDialog.NCTWavPlayer1.clrBackground
  443.     List1.ItemData(3) = frmDialog.NCTWavPlayer1.clrCenterLine
  444.     List1.ItemData(4) = frmDialog.NCTWavPlayer1.clrSelectedDigitalWaveform
  445.     List1.ItemData(5) = frmDialog.NCTWavPlayer1.clrSelectedAnalogWaveform
  446.     List1.ItemData(6) = frmDialog.NCTWavPlayer1.clrSelectedBackground
  447.     List1.ItemData(7) = frmDialog.NCTWavPlayer1.clrSelectedCenterLine
  448.     List1.ItemData(8) = frmDialog.NCTWavPlayer1.clrGrid
  449.     List1.ItemData(9) = frmDialog.NCTWavPlayer1.clrCursor
  450.     List1.ItemData(10) = frmDialog.NCTWavPlayer1.clrPlayCursor
  451.     Text1.Text = frmDialog.NCTWavPlayer1.TempDirectory
  452.     Text2.Text = frmDialog.NCTWavPlayer1.TotalAvailableFreeSpace
  453. End Sub
  454. Private Sub Check1_Click()
  455.     If Check1.Value = 1 Then Check3.Enabled = True
  456.     If Check1.Value = 0 Then Check3.Enabled = False
  457. End Sub
  458. Private Sub Check2_Click()
  459.     If Check2.Value = 1 Then Check4.Enabled = True
  460.     If Check2.Value = 0 Then Check4.Enabled = False
  461. End Sub
  462. Private Sub SetParamView()
  463.     If Check1.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleBottomScale = True
  464.     If Check1.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleBottomScale = False
  465.     frmDialog.NCTWavPlayer1.BottomScaleType = TypeHorizontal
  466.     frmDialog.NCTWavPlayer1.RightScaleType = TypeVertical
  467.     If Check4.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleGridY = True
  468.     If Check4.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleGridY = False
  469.     If Check3.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleGridX = True
  470.     If Check3.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleGridX = False
  471.     If Check2.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleRightScale = True
  472.     If Check2.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleRightScale = False
  473. End Sub
  474. Private Sub List1_Click()
  475.     Color.BackColor = List1.ItemData(List1.ListIndex)
  476. End Sub
  477. Private Sub List1_DblClick()
  478.     SelectColor
  479. End Sub
  480. Private Sub List1_ItemCheck(Item As Integer)
  481.     Select Case Item
  482.         Case 1:
  483.             Color.BackColor = frmDialog.NCTWavPlayer1.ColorDigitalWaveform
  484.         Case 2:
  485.             Color.BackColor = 0
  486.     End Select
  487. End Sub
  488. Private Sub Option3_Click(Index As Integer)
  489.     TypeHorizontal = Index + 1
  490. End Sub
  491. Private Sub Option4_Click(Index As Integer)
  492.     TypeVertical = Index + 1
  493. End Sub
  494. Private Sub SelectColor()
  495.     Dim OldCol, NewCol As OLE_COLOR
  496.     OldCol = List1.ItemData(List1.ListIndex)
  497.     CommonDialog1.Color = OldCol
  498.     CommonDialog1.DialogTitle = "Choice Color"
  499.     CommonDialog1.Flags = cdlCCRGBInit Or cdlCCFullOpen
  500.     CommonDialog1.ShowColor
  501.     NewCol = CommonDialog1.Color
  502.     List1.ItemData(List1.ListIndex) = NewCol
  503.     Color.BackColor = List1.ItemData(List1.ListIndex)
  504. End Sub
  505. Private Sub SetParametrColor()
  506.     frmDialog.NCTWavPlayer1.clrDigitalWaveform = List1.ItemData(0)
  507.     frmDialog.NCTWavPlayer1.clrAnalogWaveform = List1.ItemData(1)
  508.     frmDialog.NCTWavPlayer1.clrBackground = List1.ItemData(2)
  509.     frmDialog.NCTWavPlayer1.clrCenterLine = List1.ItemData(3)
  510.     frmDialog.NCTWavPlayer1.clrSelectedDigitalWaveform = List1.ItemData(4)
  511.     frmDialog.NCTWavPlayer1.clrSelectedAnalogWaveform = List1.ItemData(5)
  512.     frmDialog.NCTWavPlayer1.clrSelectedBackground = List1.ItemData(6)
  513.     frmDialog.NCTWavPlayer1.clrSelectedCenterLine = List1.ItemData(7)
  514.     frmDialog.NCTWavPlayer1.clrGrid = List1.ItemData(8)
  515.     frmDialog.NCTWavPlayer1.clrCursor = List1.ItemData(9)
  516.     frmDialog.NCTWavPlayer1.clrPlayCursor = List1.ItemData(10)
  517. End Sub
  518.